package by.dvrudenko.avtobaza.webapp.utils.renderer;

import org.apache.wicket.markup.html.form.IChoiceRenderer;

import by.dvrudenko.avtobaza.datamodel.City;

public class CityChoiseRenderer implements IChoiceRenderer<City> {

	public static CityChoiseRenderer INSTANCE = new CityChoiseRenderer();

	private CityChoiseRenderer() {
		super();
	}

	@Override
	public Object getDisplayValue(City city) {
		return city.getCityName();
	}

	@Override
	public String getIdValue(City city, int index) {
		return city.getId().toString();
	}

}
